🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / connections / src / commonMain / kotlin / org / meshtastic / feature / connections / ui / components / DisconnectButton.kt
Displaying Raw • Download
feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/components/DisconnectButton.kt renovate/actions-setup-java-5.x (f17e586c) Text, 1.81 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.connections.ui.components
Tff7b72import T7ee787androidx.compose.foundation.layout.fillMaxWidth
Tff7b72import T7ee787androidx.compose.material3.ButtonDefaults
Tff7b72import T7ee787androidx.compose.material3.MaterialTheme
Tff7b72import T7ee787androidx.compose.material3.OutlinedButton
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.disconnect
T8b949e/**
* Full-width error-tinted [OutlinedButton] used by both the "currently connected" and "connecting" card states.
* Centralises the color/label so every call site stays in lock-step.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffDisconnectButtonTb4b4b4(Te6edf3onClickTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4, Te6edf3enabledTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72trueTb4b4b4) Tb4b4b4{
Te6edf3OutlinedButtonTb4b4b4(
Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4.Te6edf3fillMaxWidthTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3colors Tff7b72= Te6edf3ButtonDefaultsTb4b4b4.Te6edf3outlinedButtonColorsTb4b4b4(Te6edf3contentColor Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3colorSchemeTb4b4b4.Te6edf3errorTb4b4b4)Tb4b4b4,
Te6edf3enabled Tff7b72= Te6edf3enabledTb4b4b4,
Te6edf3onClick Tff7b72= Te6edf3onClickTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3TextTb4b4b4(Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3disconnectTb4b4b4)Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s